#include "Com_h.h"
#include "Test.h"

#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
        EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}

MIDL_DEFINE_GUID(CLSID, CLSID_Test, 0xa305087f, 0x514f, 0x40a4, 0x89, 0x9d, 0xf9, 0xc4, 0x7f, 0x6e, 0x55, 0xd);

STDAPI DllGetClassObject(const CLSID& rclsid, const IID& riid, void** ppv)
{
    if (rclsid == CLSID_Test)
    {
        return TestFactory.QueryInterface(riid, ppv);
    }
    else
    {
        return S_FALSE;
    }
}

STDAPI DllCanUnloadNow()
{
    return S_OK;
}